﻿using DBEntitie;
using MySql.Data.MySqlClient.Memcached;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using RestSharp;
using System;
using System.Collections.Generic;
using System.Data;
using System.Net.Http;
using System.Text;
using System.Threading;

namespace lhservice.common
{
  public class RegHelper
  {
    public static dynamic GetRegInfo(string cid)
    {

      var url = $"{PublicHelper.RegistHost}/api/Login/GetRegInfo?cid={cid}";
      using (HttpClient client = new HttpClient())
      {
        client.Timeout = new TimeSpan(0, 0, 60);
        HttpResponseMessage response = client.GetAsync(url).Result;
        var _res = response.Content.ReadAsStringAsync().Result;
        return JObject.Parse(_res)["data"][0];
      }
    }   
  }
}
